.class public Les/z00$b;
.super Ljava/lang/Object;
.source "WifiSettings.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Les/z00;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "b"
.end annotation


# instance fields
.field a:Z

.field private b:Landroid/net/wifi/ScanResult;

.field private c:Landroid/net/wifi/WifiInfo;

.field private d:Landroid/net/NetworkInfo$DetailedState;

.field private e:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;Les/z00;Landroid/net/wifi/ScanResult;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 p2, 0x0

    .line 2
    iput-boolean p2, p0, Les/z00$b;->a:Z

    const/4 p2, 0x0

    .line 3
    iput-object p2, p0, Les/z00$b;->b:Landroid/net/wifi/ScanResult;

    .line 4
    iput-object p2, p0, Les/z00$b;->c:Landroid/net/wifi/WifiInfo;

    .line 5
    iput-object p2, p0, Les/z00$b;->d:Landroid/net/NetworkInfo$DetailedState;

    .line 6
    iput-object p3, p0, Les/z00$b;->b:Landroid/net/wifi/ScanResult;

    .line 7
    iput-object p1, p0, Les/z00$b;->e:Landroid/content/Context;

    return-void
.end method

.method public static a(Ljava/lang/String;)Ljava/lang/String;
    .locals 2

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "\""

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method


# virtual methods
.method public a()Landroid/net/wifi/WifiInfo;
    .locals 1

    .line 10
    iget-object v0, p0, Les/z00$b;->c:Landroid/net/wifi/WifiInfo;

    return-object v0
.end method

.method public a(Landroid/net/wifi/WifiInfo;Landroid/net/NetworkInfo$DetailedState;)V
    .locals 2

    .line 4
    iget-object v0, p0, Les/z00$b;->b:Landroid/net/wifi/ScanResult;

    iget-object v0, v0, Landroid/net/wifi/ScanResult;->SSID:Ljava/lang/String;

    if-eqz v0, :cond_0

    invoke-virtual {p1}, Landroid/net/wifi/WifiInfo;->getSSID()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 5
    iput-object p1, p0, Les/z00$b;->c:Landroid/net/wifi/WifiInfo;

    if-eqz p2, :cond_2

    .line 6
    iput-object p2, p0, Les/z00$b;->d:Landroid/net/NetworkInfo$DetailedState;

    goto :goto_0

    .line 7
    :cond_0
    sget-object p1, Landroid/net/NetworkInfo$DetailedState;->CONNECTING:Landroid/net/NetworkInfo$DetailedState;

    if-eq p2, p1, :cond_1

    sget-object p1, Landroid/net/NetworkInfo$DetailedState;->OBTAINING_IPADDR:Landroid/net/NetworkInfo$DetailedState;

    if-eq p2, p1, :cond_1

    sget-object p1, Landroid/net/NetworkInfo$DetailedState;->CONNECTED:Landroid/net/NetworkInfo$DetailedState;

    if-eq p2, p1, :cond_1

    sget-object p1, Landroid/net/NetworkInfo$DetailedState;->AUTHENTICATING:Landroid/net/NetworkInfo$DetailedState;

    if-eq p2, p1, :cond_1

    sget-object p1, Landroid/net/NetworkInfo$DetailedState;->DISCONNECTED:Landroid/net/NetworkInfo$DetailedState;

    if-ne p2, p1, :cond_2

    :cond_1
    const/4 p1, 0x0

    .line 8
    iput-object p1, p0, Les/z00$b;->c:Landroid/net/wifi/WifiInfo;

    .line 9
    iput-object p1, p0, Les/z00$b;->d:Landroid/net/NetworkInfo$DetailedState;

    :cond_2
    :goto_0
    return-void
.end method

.method public a(Landroid/net/wifi/ScanResult;)Z
    .locals 2

    .line 2
    iget-object v0, p0, Les/z00$b;->b:Landroid/net/wifi/ScanResult;

    iget-object v0, v0, Landroid/net/wifi/ScanResult;->SSID:Ljava/lang/String;

    if-eqz v0, :cond_0

    iget-object v1, p1, Landroid/net/wifi/ScanResult;->SSID:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 3
    iput-object p1, p0, Les/z00$b;->b:Landroid/net/wifi/ScanResult;

    const/4 p1, 0x1

    return p1

    :cond_0
    const/4 p1, 0x0

    return p1
.end method

.method public b()I
    .locals 2

    .line 1
    iget-object v0, p0, Les/z00$b;->c:Landroid/net/wifi/WifiInfo;

    const/4 v1, 0x4

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getRssi()I

    move-result v0

    invoke-static {v0, v1}, Landroid/net/wifi/WifiManager;->calculateSignalLevel(II)I

    move-result v0

    return v0

    .line 3
    :cond_0
    iget-object v0, p0, Les/z00$b;->b:Landroid/net/wifi/ScanResult;

    iget v0, v0, Landroid/net/wifi/ScanResult;->level:I

    invoke-static {v0, v1}, Landroid/net/wifi/WifiManager;->calculateSignalLevel(II)I

    move-result v0

    return v0
.end method

.method public c()Ljava/lang/String;
    .locals 1

    .line 1
    iget-object v0, p0, Les/z00$b;->b:Landroid/net/wifi/ScanResult;

    iget-object v0, v0, Landroid/net/wifi/ScanResult;->SSID:Ljava/lang/String;

    return-object v0
.end method

.method public d()I
    .locals 2

    .line 1
    iget-object v0, p0, Les/z00$b;->b:Landroid/net/wifi/ScanResult;

    iget-object v0, v0, Landroid/net/wifi/ScanResult;->capabilities:Ljava/lang/String;

    const-string v1, "WEP"

    invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    return v0

    .line 2
    :cond_0
    iget-object v0, p0, Les/z00$b;->b:Landroid/net/wifi/ScanResult;

    iget-object v0, v0, Landroid/net/wifi/ScanResult;->capabilities:Ljava/lang/String;

    const-string v1, "PSK"

    invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_1

    const/4 v0, 0x2

    return v0

    .line 3
    :cond_1
    iget-object v0, p0, Les/z00$b;->b:Landroid/net/wifi/ScanResult;

    iget-object v0, v0, Landroid/net/wifi/ScanResult;->capabilities:Ljava/lang/String;

    const-string v1, "EAP"

    invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_2

    const/4 v0, 0x3

    return v0

    :cond_2
    const/4 v0, 0x0

    return v0
.end method

.method public e()Landroid/net/NetworkInfo$DetailedState;
    .locals 1

    .line 1
    iget-object v0, p0, Les/z00$b;->d:Landroid/net/NetworkInfo$DetailedState;

    return-object v0
.end method

.method public f()[Ljava/lang/String;
    .locals 4

    const/4 v0, 0x2

    new-array v0, v0, [Ljava/lang/String;

    .line 1
    iget-object v1, p0, Les/z00$b;->b:Landroid/net/wifi/ScanResult;

    iget-object v1, v1, Landroid/net/wifi/ScanResult;->SSID:Ljava/lang/String;

    invoke-static {v1}, Les/z00;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x0

    aput-object v1, v0, v2

    .line 2
    iget-object v1, p0, Les/z00$b;->d:Landroid/net/NetworkInfo$DetailedState;

    const/4 v2, 0x1

    if-nez v1, :cond_0

    const/4 v1, 0x0

    aput-object v1, v0, v2

    goto :goto_0

    .line 3
    :cond_0
    sget-object v3, Landroid/net/NetworkInfo$DetailedState;->CONNECTED:Landroid/net/NetworkInfo$DetailedState;

    if-ne v1, v3, :cond_1

    .line 4
    iget-object v1, p0, Les/z00$b;->e:Landroid/content/Context;

    const v3, 0x7f1108df

    invoke-virtual {v1, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    aput-object v1, v0, v2

    goto :goto_0

    .line 5
    :cond_1
    sget-object v3, Landroid/net/NetworkInfo$DetailedState;->CONNECTING:Landroid/net/NetworkInfo$DetailedState;

    if-ne v1, v3, :cond_2

    .line 6
    iget-object v1, p0, Les/z00$b;->e:Landroid/content/Context;

    const v3, 0x7f1108e0

    invoke-virtual {v1, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    aput-object v1, v0, v2

    goto :goto_0

    .line 7
    :cond_2
    sget-object v3, Landroid/net/NetworkInfo$DetailedState;->OBTAINING_IPADDR:Landroid/net/NetworkInfo$DetailedState;

    if-ne v1, v3, :cond_3

    .line 8
    iget-object v1, p0, Les/z00$b;->e:Landroid/content/Context;

    const v3, 0x7f1108eb

    invoke-virtual {v1, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    aput-object v1, v0, v2

    goto :goto_0

    .line 9
    :cond_3
    sget-object v3, Landroid/net/NetworkInfo$DetailedState;->SCANNING:Landroid/net/NetworkInfo$DetailedState;

    if-ne v1, v3, :cond_4

    .line 10
    iget-object v1, p0, Les/z00$b;->e:Landroid/content/Context;

    const v3, 0x7f1108f4

    invoke-virtual {v1, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    aput-object v1, v0, v2

    goto :goto_0

    .line 11
    :cond_4
    sget-object v3, Landroid/net/NetworkInfo$DetailedState;->AUTHENTICATING:Landroid/net/NetworkInfo$DetailedState;

    if-ne v1, v3, :cond_5

    .line 12
    iget-object v1, p0, Les/z00$b;->e:Landroid/content/Context;

    const v3, 0x7f1108ff

    invoke-virtual {v1, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    aput-object v1, v0, v2

    :cond_5
    :goto_0
    return-object v0
.end method
